home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "Module1"
- 'Public variables for multi play choices
- Public StartWhere As Integer
- Public StartNumber As Integer
- Public StartName As String
- Public Cancelled As Integer
- Public FileMark As Integer
- Public i As Integer, y As Integer
-
- 'Other public variables
- Public FavouritesPath As String
- Public DialogCaption As String
-
- ' Public Constants
- Public Const MCIAppTitle = "MIDI CYCLOTRON "
-
- ' These constants are defined in mmsystem.h.
- Public Const MCIErrInvalidDeviceID = 30257
- Public Const MCIErrDeviceOpen = 30263
- Public Const MCIErrCannotLoadDriver = 30266
- Public Const MCIErrUnsupportedFunction = 30274
- Public Const MCIErrInvalidFile = 30304
-
- 'API Declares to determine drive type (See MCIApp Form_Load event)
- 'If 32bit then,
- #If Win32 Then
- Public Declare Function GetDriveType _
- Lib "kernel32" Alias "GetDriveTypeA" ( _
- ByVal cDrive As String) As Long
- 'Otherwise, if 16bit then,
- #Else
- Public Declare Function GetDriveType _
- Lib "Kernel" (ByVal nDrive As Integer) As Integer
- #End If
-
- ' Force all run-time errors to be handled here.
- Sub DisplayErrorMessageBox()
- Dim Msg As String
- Select Case Err
- Case MCIErrCannotLoadDriver
- Msg = "Error load media device driver."
- Case MCIErrDeviceOpen
- Msg = "The device is not open or is not known."
- Case MCIErrInvalidDeviceID
- Msg = "Invalid device id."
- Case MCIErrInvalidFile
- Msg = "Invalid filename."
- Case MCIErrUnsupportedFunction
- Msg = "Action not available for this device."
- Case Else
- Msg = "Unknown error (" + Str$(Err) + ")."
- End Select
-
- MsgBox Msg, 48, MCIAppTitle
- End Sub
-